from Graph import *
from random import *
from itertools import *


#we count on for every edge (single edge matchings)
#we then go back through for 2 - V/2 inclusive and generate all combinations
#of edges of that size.  We filter out anything using our isMatching 
#predicate and then add the count to our accumulated value
def dcount(g):
    count = len(g.edges)
    for i in range(2,(len(g.vertices)/2) + 1):
        print i
        count1=0
        for c in combinations(g.edges,i):
            count1+= isMatching(c)
        if count1==0:
            return count
        count+=count1
    return count


